package war
{
	import flash.display.Sprite;
	/**
	 * 洗牌 
	 * @author war
	 * 
	 */	
	public class Shuffle extends Sprite
	{
		public var shuffleArr:Array=[];
		public function Shuffle()
		{
			super();
			var cart:Nature=new Nature();
			for (var i:int = 0; i < 10000; i++) 
			{
				var num:int=Math.random()*cart.cartArr.length;
				cart.cartArr.push(cart.cartArr.splice(num,1)[0]);					
			}
			shuffleArr=cart.cartArr;
			/*trace(shuffleArr.length);
			for (var j:int = 0; j < shuffleArr.length; j++) 
			{
				addChild(shuffleArr[j]["name"]);
				shuffleArr[j]["name"].x=j*30;
			}*/
			
		}
	}
}